# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Hannes Braun <hannes@hannesbraun.net>
pkgname=git-cola
pkgver=4.8.2
pkgrel=0
pkgdesc="GUI application for git built on Python & Qt"
url="https://git-cola.github.io"
arch="noarch !armhf !riscv64" # py3-qt6
license="GPL-2.0-or-later"
depends="python3 py3-qt6 py3-qtpy"
makedepends="py3-setuptools py3-setuptools_scm py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-doc $pkgname-pyc"
source="git-cola-$pkgver.tar.gz::https://github.com/git-cola/git-cola/archive/v$pkgver.tar.gz"
# testsuite hangs after a while.
options="!check"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 1
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/git_cola*.whl
}

sha512sums="
0b924837e8e5dcaa9687ffdff779bd3ed9f629713826f6c537d6470fdaed84bab3cec793aa9f1cf0e7bce3c4dae60c838822005efa93236b5964c8be74ef33cc  git-cola-4.8.2.tar.gz
"
